/**
 * 
 */
package com.kyrioscraft.cloud.security.core.validate.code;


import com.kyrioscraft.cloud.security.core.properties.SecurityConstants;

public enum ValidateCodeType {
	
	/**
	 * 短信验证码
	 */
	SMS {
		@Override
		public String getParamNameOnValidate() {
			return SecurityConstants.DEFAULT_PARAMETER_NAME_CODE_SMS;
		}

		@Override
		public String getValidateUrl() {
			return SecurityConstants.DEFAULT_LOGIN_PROCESSING_URL_MOBILE;
		}
	},
	/**
	 * 图片验证码
	 */
	IMAGE {
		@Override
		public String getParamNameOnValidate() {
			return SecurityConstants.DEFAULT_PARAMETER_NAME_CODE_IMAGE;
		}

		@Override
		public String getValidateUrl() {
			return SecurityConstants.DEFAULT_LOGIN_PROCESSING_URL_FORM;
		}
	};

	/**
	 * 校验时从请求中获取的参数的名字
	 * @return
	 */
	public abstract String getParamNameOnValidate();

	public abstract String getValidateUrl();

}
